package com.cw.mapper;

import com.cw.beans.Maintain;
import com.cw.util.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface MaintainMapper {
    //查询所有维修记录
    ArrayList <Maintain> getMaintain(@Param("maintain") Maintain maintain, @Param("page") Page page ,
                                     @Param("type_id") String type_id,@Param("dept_id") String dept_id);
    //查询维修记录总数
    //添加维修记录
    void addMaintain(Maintain maintain);
  int   getMaintainnNum(@Param("maintain") Maintain maintain,
    @Param("type_id") String type_id,@Param("dept_id") String dept_id);
   void  updateMaintain(@Param("id") int id ,@Param("maintenance_completion_time")  String maintenance_completion_time);

    int   getMaintainnNum1(@Param("maintain") Maintain maintain,
                          @Param("type_id") String type_id,@Param("dept_id") String dept_id);
    ArrayList <Maintain> getMaintain1(@Param("maintain") Maintain maintain, @Param("page") Page page ,
                                     @Param("type_id") String type_id,@Param("dept_id") String dept_id);
}
